package com.xmh.ssm.dataSource;

import com.xmh.SpringBootDemo1Application;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.stereotype.Component;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@Component
@SpringBootTest(classes = SpringBootDemo1Application.class)
public class MyDataSource {

    @Value("${spring.datasource.password}")
    private String password;

    @Test
    public void testOnt(){
        System.out.println(password);
    }

}
